/**
 * Created by Sky on 2016/7/19.
 */
module.exports = function ($stateParams, $http, $q, httpservice, Session) {
    var contactInfoService = {};
  /*  //获取联系人信息
    contactInfoService.getPersonData = function (token) {
        var deferred = $q.defer();
        $http({
            method: 'GET',
            url:httpservice.contactInfoList,
            params: {'token':token}
        }).then(function successCallback(response) {
                deferred.resolve(response.data);
            }, function errorCallback(response) {
                deferred.reject(response.data);
            }
        );
        return deferred.promise;
    };*/
    //获取登陆用户信息
    contactInfoService.getUserData = function (token) {
        var deferred = $q.defer();
        $http({
            method: 'POST',
            url:httpservice.userList,
            params: {'token':token}
        }).then(function successCallback(response) {
                deferred.resolve(response.data);
            }, function errorCallback(response) {
                deferred.reject(response.data);
            }
        );
        return deferred.promise;
    };
    return contactInfoService;
};